﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace OutpatientApi.DTO
{
    /// <summary>
    /// 付款查询显示字段Dto
    /// </summary>
    public class FeeDTO
    {
        /// <summary>
        /// 费用记录唯一标识,主键,自增
        /// </summary>
        public int FeeId { get; set; }

        /// <summary>
        /// 关联住院登记表的外键
        /// </summary>
        [Required]
        public int AdmissionId { get; set; }


        /// <summary>
        /// 患者卡号，标识患者
        /// </summary>
        public string Patient { get; set; }

        /// <summary>
        /// 关联科室表的外键,标识患者所属科室
        /// </summary>
        public int DepartmentId { get; set; }


        /// <summary>
        /// 科室类型
        /// </summary>
        public string DepartmentName { get; set; }

        /// <summary>
        /// 交款金额(单位:元)
        /// </summary>
        [Required]
        [Column(TypeName = "decimal(10,2)")]
        public decimal Amount { get; set; }

        /// <summary>
        /// 剩余金额(单位:元)
        /// </summary>
        [Column(TypeName = "decimal(10,2)")]
        public decimal RemainingAmount { get; set; }

        /// <summary>
        /// 已用金额(单位:元)
        /// </summary>
        [Column(TypeName = "decimal(10,2)")]
        public decimal UsageAmount { get; set; }


        /// <summary>
        /// 用户姓名 - 必填，最大长度50位
        /// </summary>
        public string Name { get; set; } = string.Empty;

    }



    /// <summary>
    /// 付款查看条件
    /// </summary>
    public class GetFeeDto
    {
        /// <summary>
        /// 患者卡号，标识患者
        /// </summary>
        public string ?Patient { get; set; }
    }
}
